package ooday03;

public class InterfaceDemo {
    public static void main(String[] args) {
        //

    }
}
//演示接口的语法
interface Inter{
    abstract void show();
    void test();//接口中的方法默认都是抽象的，前面默认有abstract
    public void eatting();
}
class LowClass{
    public String name;
}
 class InterImpl extends LowClass implements Inter {
    public void show(){}
    public void test(){}
    public void eatting(){}
}
//演示接口的多实现
interface Inter1{
    void show();
}
interface Inter2{
    void test();
}
class InterImpl2 implements Inter1,Inter2{
    public void show(){

    }
    public void test(){}
}
//演示即继承类又实现接口
//1. 定义一个抽象类——————写一个抽象方法
abstract class Boo{
    public abstract void say();
}
//2. 定义一个类继承抽象类，且实现俩接口
class BooImpl extends Boo implements Inter1,Inter2{
    public void show(){}
    public void test(){}
    public void say(){}
}
//接口继承接口的演示
interface Inter3{
    void show1();
}
interface Inter4{
    void show2();
}
interface Inter5 extends Inter3,Inter4{
    void show3();
}
class InterImpl4 implements Inter5{
    public void show1(){}
    public void show2(){}
    public void show3(){}
}


















